﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSMock.Implementation;

namespace PSMock
{

	/// <summary>
	/// Option for mocking a type.
	/// </summary>
	public class TypeOption
	{
		protected MockedType mockedType;

		/// <summary>
		/// Initializes a new instance of the <see cref="AllMembersOption"/> class.
		/// </summary>
		/// <param name="instance">The instance.</param>
		public TypeOption(MockedType type)
		{
			this.mockedType = type;
		}


		/// <summary>
		/// Throws the specified exception when the mocked method of function is called.
		/// </summary>
		public TypeOption Throw(Exception exception)
		{
			mockedType.ThrowException = exception;
			return this;
		}
	}

}
